import React, { useRef, useEffect } from "react"

class Test extends React.Component {
  render () {
    return (
      <div>Test</div>
    )
  }
}

function UseRef () {
  const testRef = useRef(null)
  useEffect(() => {
    console.log(testRef.current)
  })
  return (
    <div>
      <Test ref={testRef} />
    </div>
  )
}

export default UseRef